{extend name="index_layout"/}
{block name="main"}
<form class="layui-form" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">标题</label>
        <div class="layui-input-block">
            <input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="标题"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">发送内容</label>
        <div class="layui-input-block">
            <textarea name="content" lay-verify="required"  placeholder="发送内容"
                      class="layui-textarea">{$data.content}</textarea>
        </div>
    </div>

<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">发送类型</label>-->
<!--        <div class="layui-input-block">-->
<!--            <select name="msg_cate" lay-verify="required">-->
<!--                <option value="">请选发送类型</option>-->
<!--                {if !empty($msg_cate)}-->
<!--                {foreach $msg_cate as $key}-->
<!--                <option <?php if( $key['id'] == $data['msg_cate_id']){ ?> selected <?php }?> value="{$key.id}"-->
<!--                name="row[msg_cate_id]">{$key.name}</option>-->
<!--                {/foreach}-->
<!--                {/if}-->
<!--            </select>-->
<!--        </div>-->
<!--    </div>-->

<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">是否定时</label>-->
<!--        <div class="layui-input-block">-->

<!--            <input type="radio" name="is_time" value="0" {if $data.is_time==0}checked{/if} title="立即发送">-->

<!--            <input type="radio" name="is_time" value="1" {if $data.is_time==1}checked{/if} title="定时发送">-->
<!--        </div>-->
<!--    </div>-->

<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label ">发送时间</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input class="layui-input" id="testTime" type="text" name="send_time" placeholder="请选择日期" required-->
<!--                   value="{$data.create_time}"-->
<!--                   autocomplete="off">-->
<!--        </div>-->
<!--    </div>-->

    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    layui.use(['yznForm', 'laydate'], function () {
        var yznForm = layui.yznForm;
        var laydate = layui.laydate;
        yznForm.bindevent($("form.layui-form"));
        laydate.render({
            elem: '#testTime,#testTime2',//指定元素
            type: 'datetime',
        });
    });
</script>
{/block}